<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<html>
<head>
<title>发起支付页面</title>
<script src="../../resources/jquery-1.8.3.js"></script>
<script type="text/javascript">
   	function onBridgeReady(){
   		
	   		//var appId = ${'appId'}.val();
	   	   WeixinJSBridge.invoke(
	   	       'getBrandWCPayRequest', {
	   	           "appId" : '',     //公众号名称，由商户传入     
	   	           "timeStamp":" 1467356125",         //时间戳，自1970年以来的秒数     
	   	           "nonceStr" : "O1HZ6uomrYBJrRi3", //随机串     
	   	           "package" : "prepay_id=wx20160701145517eece6106d40200316327",     
	   	           "signType" : "MD5",         //微信签名方式：     
	   	           "paySign" : "1B8DA67F705DF6FC59D47D87154CC70C" //微信签名 
	   	       },
	   	       function(res){     
	   	           if(res.err_msg == "get_brand_wcpay_request：ok" ) {}     // 使用以上方式判断前端返回,微信团队郑重提示：res.err_msg将在用户支付成功后返回    ok，但并不保证它绝对可靠。 
	   	       }
	   	   ); 
	   	}
	   	if (typeof WeixinJSBridge == "undefined"){
	   	   if( document.addEventListener ){
	   	       document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
	   	   }else if (document.attachEvent){
	   	       document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
	   	       document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
	   	   }
	   	}else{
	   	   onBridgeReady();
	   	}
   	</script> 
<style type="text/css"></style>
</head>

<body>
	</br>
	</br>
	</br>
	</br>
	<div align="center">
		<button
			style="width: 210px; height: 30px; background-color: #FE6714; border: 0px #FE6714 solid; cursor: pointer; color: white; font-size: 25px;"
			type="button" onclick="onBridgeReady()">贡献一下</button>
	</div>
	<input style="border: 0px #FE6714; font-size: 25px" name="appId"
		value="${bridge.appId}" /> <br>
	<input style="border: 0px #FE6714; font-size: 25px" name="timeStamp"
		value="${bridge.timeStamp}" /><br>
	<input style="border: 0px #FE6714; font-size: 25px" name="packageValue"
		value="${bridge.packageValue}" /><br>
	<input style="border: 0px #FE6714; font-size: 25px" name="nonceStr"
		value="${bridge.nonceStr}" /><br>
	<input style="border: 0px #FE6714; font-size: 25px" name="signType"
		value="${bridge.signType}" /><br>
	<input style="border: 0px #FE6714; font-size: 25px" name="paySign"
		value="${bridge.paySign}" /><br>
</body>
</html>